package com.ruoyi.app.common;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * \* Created with IntelliJ IDEA.
 * \* User: xiaoban
 * \* Date: 2019/7/4
 * \路径映射
 */
@Configuration
public class UploadFilePathConfig extends WebMvcConfigurerAdapter {


    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //registry.addResourceHandler("/icon/**").addResourceLocations("file:C:\\Users\\lenovo\\Desktop\\图片\\");//"file://////water/icon/");
        registry.addResourceHandler("/photo/**").addResourceLocations("file://////kanai/icon/");
        //registry.addResourceHandler("/**").addResourceLocations("file://////rice/");
        super.addResourceHandlers(registry);
    }
}
